package thread;

class SingletonLazy{
    Object locker=new Object();
    private volatile SingletonLazy instance=null;

    public SingletonLazy getInstance() {
       if (instance==null){
           synchronized (locker){
               if(instance==null){
                   instance=new SingletonLazy();
               }
           }
       }
        return instance;
    }
    private SingletonLazy(){ }
}



public class ThreadDemo22 {

}

